By youngwax on
Some themes don't show the collapsible settings forms correctly. What is the secret for making a theme where the forms work?
Some themes don't show the collapsible settings forms correctly. What is the secret for making a theme where the forms work?
Comments
Good question
Yeah, I'm looking for an answer to that too...
Can anyone help us out?
indeed
that makes three of us.
?>
seems to be producing different code depending on the theme. Specifically, it does not include:
in my custom theme. (Seperate question: where/why is $styles omitting these scripts in my theme but not others?)
However, even when I include that js manually, the collapsible form areas show up collapsed with the section title as plaintext (no link or ability to expand).
Where is the key to this?!.. I can't seem to make it work.
The code which is not working --
The problem I had was that I
The problem I had was that I was calling a function from another script from the body tag in the page.tpl.php whitch was somehow interfering with the collapse.js script. I removed it and now the collapsible stuff actually does its job, just that I'd REALLY like to keep my fancy script (slowly changes the bgcolor of the page) without messing it up. Anyone heard of this one before? I honestly didn't take a deeper look, I guess I just chose the easy way removing it. Maybe some var interference...??
EDIT:
Actually, for future reference, this is the script I used for the color thing:
I'm looking for help on this too
We don't have a script running, but we do have flash.
I have noticed in Firefox that the info bar says tranfering data, but the js script never seems to load. The script works when I switch to bluemarine theme, so I'm wondering if my flash file is preventing the download.
Any insights would be greatly appreciated.
alynner
figured it out
I do have a script running (oops)... I am using macromedia scripts for rollovers and loading images. I solved it by putting the scripts in a js file and instead of using onload() in the body tag, I used this at the beginning of the js file:
(I got this from http://drupal.org/node/72304#comment-113782)
I'm pretty sure it was the onload code sitting in the body tag that did it, because it also has php code which appears to call the onload scripts:
<body<?php print $onload_attributes; ?> >filip_tc - this is likely your problem as well and if need be, you could put the bgcolor in a css file.
I'm having this problem
I'm having this problem where I can create a collapsible fieldset with markup, but I have a Javascript funciton that is supposed to create the same thing, with the same html code, but the js generated version is not collapsible, it displays as plain text, same problem as was described above earlier
so maybe this is some kind of javascript conflict, I wonder how to get around it....
use the code already there?
perhaps instead of making more js code to do the same thing, just reference what is already been made in collapse.js?
????
I need to make more js to do something that collapse.js does not do, nor would it be expected to do what I want, which is to add extra fieldsets containing extra form fields to my form
Module Dev?
Perhaps you need to look at the actual module, you can add more fields in the _form function and have it update the db in the _update or API function. I usually just do a search for 'insert' or 'create' to find out where it is updating the db. Rather than messing with the actual js file.
Yup, but:
alynner wrote:
Yeah, it was, however I now have another problem... I started a new thread here:
http://drupal.org/node/83522
Thx,
Phil
just add this line to your user_profile.tpl.php file
drupal_add_js('misc/collapse.js');nope - fieldsets remain collaped...
unfortunately, my page source already contains misc/collapse.js
also, the onload... thing did not work : that variable seems to be empty;
still unable to de-collapse... :-( !!
PS: in fact, in my case there IS something happening when I try to uncollapse :
the field gets about one pixel bigger, in very lucky cases
I can (sometimes) see just the uppermost row of pixels from the text that should appear ; then, if it's again the title od another collapsable field, i can make my way through...
file location
What folder can I find the file: user_profile.tpl.php? Do you mean page.tpl.php?
I'm new to Drupal and I too am having trouble adding a javascript call.
Thanks
fixed
Hi,
I was able to solve my java insertion by adding it to the single page it was required for instead of adding it to the page template. No conflicts now and the 'contact us' popup window works fine.
Initially when I tried to have the java added to the template so it was available 'site wide' it caused problems with the edit page menus as described in other posts.
Now I have also solved the captcha problems I was having too. This is my first try at building a site with Drupal an I am pretty pleased with the results so far. http://www.clickbankaccountpro.com
Cheers,
Kent
New $scripts variable in 5.x
One thing I have found, while upgrading my theme from 4.7 to 5.1, is than apparently there is a new variable called $scripts.
I've copied this line from Drupal's new Garland theme, so my page.tpl.php looks like this:
This should automatically include all JavaScripts files. In my case, this is the final code included:
Brilliant! Thanks for the
Brilliant! Thanks for the observation, saved me from a huge headache.
Once again, props.
question
just a question. I am not a php wiz, so bear with me. I was wondering where to place the bottom set of code (script type= ...).
may not be theme related
I have the same problem, but I'm not sure it's themes related. It has happened to me with garland, barlow and ocadia themes. The page for which it occurs most frequently for me is the modules list page. If I clear my cache and reload the page then the collapsible field sets work. They tend to appear a couple of seconds after the page finishes loading. However, if I reload the page again, without clearing my cache, then it stops working. The majority of the time I see no text at all - well I see the text (without the arrow) briefly as the page is loading but then it disappears.
It may be a Firefox issue - see #119724. Applying the patch from comment #35 in issue #104175 seems to have done the trick for me.
Stella
firefox / iceape issue - OK with Moz.1.7.8
i think so too... I just noticed that the same pages work fine on my somewhat older Mozilla 1.7.8.1 / Gecko/20060926
while on Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20070510 Iceape/1.0.9 (Debian-1.0.9-0etch1)
they don't :-(
For me it was the FireFox Web Dev Add-on
I've never touched this feature before so I have no idea how it became activated in the first place, but for me the issue was caused by the Firefox Web Developer Add-on's "Disable" button. Turning off the following ("Strict Warnings") did the trick:
http://i19.tinypic.com/6cfc26s.jpg
Load collapse.js with nodeapi
I don't think you can call drupal_add_js() in a theming file, but you can call it from a custom module. If you have some forms that are embedded in nodes, you can use the nodeapi like so to get drupal to load collapse.js (this is for drupal 6):